﻿using Kinlo.Drv.Drv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kinlo.Drv.Machine
{
    public class KNCScannerMachine
    {
        #region 字段
        KNCScannerDrv Scanner;
        string IP;
        int Port;
        public string ID;
        public string ResultToken = "ScanResultToken";
        #endregion

        #region 方法
        public KNCScannerMachine(string ip, int port, string id, int timeout = 1000)
        {
            IP = ip;
            Port = port;
            ID = id;
            Scanner = new KNCScannerDrv(ip, port, id, timeout);
        }
        public bool Connected
        {
            get { return Scanner.Connected; }
        }

        public void StartScan()
        {
            Scanner.StartScan();
        }
        public string Receive()
        {
            return Scanner.Receive();
        }
        public void StopScan()
        {
            Scanner.StopScan();
        }
        public void Open()
        {
            Scanner.Open();
        }
        public void Close()
        {
            Scanner.Close();
        }
        #endregion
    }
}
